﻿using System.Collections.Generic;
using System.Threading.Tasks;
using System.Web.Http;
using Tisonet.Dobrak.Domain.Models;
using Tisonet.Dobrak.Services;
using Tisonet.Dobrak.Services.Projections;

namespace Tisonet.Dobrak.Web.Controllers
{
    public class ProjectionsController : ApiController
    {
        private readonly IProjectionsService _service;

        public ProjectionsController()
        {
            
        }

        public ProjectionsController(IProjectionsService service)
        {
            _service = service;
        }

        // GET api/<controller>
        public async Task<IEnumerable<Projection>> Get()
        {
            return await _service.GetProjectionsAsync();
        }


        /*
        // GET api/<controller>/5
        public string Get(int id)
        {
            return "value";
        }

        // POST api/<controller>
        public void Post([FromBody]string value)
        {
        }

        // PUT api/<controller>/5
        public void Put(int id, [FromBody]string value)
        {
        }

        // DELETE api/<controller>/5
        public void Delete(int id)
        {
        }*/
    }
}